package com.ruoyi.pic.service.impl;



import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import com.ruoyi.pic.service.FileStorageService;
import com.ruoyi.pic.service.LideshowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author Lenovo
 * @description 针对表【lideshow(轮播图)】的数据库操作Service实现
 * @createDate 2025-03-05 14:16:25
 */
@Service
public class LideshowServiceImpl implements LideshowService {

    @Autowired
    private FileStorageService fileStorageService;

    /**
     * 轮播图分页查询
     *
     * @param lideshowVo
     * @return
     */

    /**
     * 上传图片
     * @param file
     * @return
     * @throws Exception
     */
    @Override
    public String updatefile(MultipartFile file) throws Exception {
        if(file==null || file.getSize()<0){
            return "";
        }
        String s = fileStorageService.uploadImageFile(file.getOriginalFilename(), file.getInputStream());
        return s;

    }


}




